/**
 * Copyright (C), 2018 store
 * Encoding: UTF-8
 * Date: 20-4-26 下午2:25
 * History:
 */
package com.swak.frame.datasource.config;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;

import org.springframework.validation.annotation.Validated;

/**
 * 
 * @ClassName: DataBasePropertie.java
 * @author: colley.ma
 * @date: 2022/03/17 15:28:33
 */
@Validated
public class DataBasePropertie {

	/**
	 * master主库
	 */
	@NotBlank
	private String master;

	/**
	 * 备库slaves
	 */
	private String[] slaves;

	/**
	 * mapper basePackage
	 */
	@NotBlank
	private String mapper;

	/**
	 * sqlmapper path
	 */
	@NotEmpty
	private String[] mapperLocations;

	/**
	 * dbName
	 */
	private String dbName;

	/**
	 * {@link @Primary}
	 */
	private boolean primary;

	public String getMaster() {
		return master;
	}

	public void setMaster(String master) {
		this.master = master;
	}

	public String[] getSlaves() {
		return slaves;
	}

	public void setSlaves(String[] slaves) {
		this.slaves = slaves;
	}

	public String getMapper() {
		return mapper;
	}

	public void setMapper(String mapper) {
		this.mapper = mapper;
	}

	public String[] getMapperLocations() {
		return mapperLocations;
	}

	public String getDbName() {
		return dbName;
	}

	public void setDbName(String dbName) {
		this.dbName = dbName;
	}

	public void setMapperLocations(String[] mapperLocations) {
		this.mapperLocations = mapperLocations;
	}

	public boolean isPrimary() {
		return primary;
	}

	public void setPrimary(boolean primary) {
		this.primary = primary;
	}

}
